Reesenews.views.ArticleListView = Ext.extend(Ext.Panel, {

    articleStore: Ext.emptyFn,
    articleList: Ext.emptyFn,
    layout: 'fit',
    cls: 'list-panel',

    initComponent: function () {
       
   
        this.topToolbar = new Ext.Toolbar({
            cls: banner,
            items: [
                { xtype: 'spacer'}
            ]
        });
        
        this.dockedItems =  [this.topToolbar];
        this.articleList = new Ext.List({
            store: this.articleStore,
            grouped: false,
emptyText: '</pre> <div style="margin: <span class=;">5px;">No articles cached.</div> <pre> <pre>',
itemTpl: '<div class="list-item-title" style = "word-wrap: break-word">{title}</div>'
        });
        
        this.articleList.on('itemtap',this.onViewArticle,this),

        this.items = [this.articleList]; 
        

        Reesenews.views.ArticleListView.superclass.initComponent.call(this);
    },
    
    onViewArticle: function(view, index, item, e){
    	var record = view.store.getAt(index);
        Ext.dispatch({
            controller: Reesenews.controllers.articleController,
            action: 'viewarticle',
            article: record
        });
    },
    
    refreshList: function () {
        this.articleList.refresh();
    }
});